<%@include file="/WEB-INF/templates/configuration.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<h2>Add new forum topic</h2>
<h2>${teststring}</h2>


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="windows-1252"%>

<h2>${pageTitle}</h2>
<c:if test="${not empty foutMelding}">
    <!-- Mochten er foutmeldingen zijn, dan worden ze hier getoond -->
    <p>${foutMelding}</p>
</c:if>
<c:choose>
    <c:when test="${empty ForumTopic.forumtopicid}">
        <!-- Als er geen id is meegegeven, ga je een forum toevoegen -->
        <form id="newforum" action="" method="post">
        </c:when>
        <c:otherwise>
            <!-- Anders ga je een gebruiker wijzigen -->
            <form id="editforum" action="edit" method="post">
            </c:otherwise>
        </c:choose>
        <p>
            <c:if test="${not empty ForumTopic.forumtopicid}">
                <!-- Het id wordt meegestuurd, om te bepalen welke forum je gaat wijzigen -->
                <input type="hidden" name="forumtopicid" id="forumtopicid" value="${ForumTopic.forumtopicid}"></input>
            </c:if>
        <table border="0">
            <tr>
                <td><label for="forumtopicname">Thread Name</label></td>
                <td><input type="textfield" id="forumtopicname" name="forumtopicname" value="${ForumTopic.forumtopicname}"></input></td>
            </tr>
            <tr>
                <td><label for="forumtopicbody">Body</label></td>
                <td><input type="textfield" id="forumtopicbody" name="forumtopicbody" value="${ForumTopic.forumtopicbody}" style="width:450px; height: 250px;"></input></td>
            </tr>
            
            <tr>
                <td><label for="parenttopicid">Parent topic</label></td>
                <td><input type="textfield" id="parenttopicid" name="parenttopicid" value="${ForumTopic.parenttopicid}"></input></td>
            </tr>
            
            
  
        </table>
        </p>
        <p>
            <input class="submit" type="submit" value="Add">
        </p>
    </form>